<!DOCTYPE html>
<html lang="en">
<head>

    <title>隐藏页面</title>
    <meta charset="UTF-8">
    <!--edge浏览器H5兼容设置-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--360浏览器H5兼容设置-->
    <meta name="renderer" content="webkit" />
    <title>器材管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--导入核心文件-->
    <script src="../bootstrap3/js/holder.js"></script>
    <link href="../bootstrap3/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="../bootstrap3/jquery-1.9.1.min.js"></script>
    <script src="../bootstrap3/js/bootstrap.js"></script>
    <!-- 字体图标 -->
    <link rel="stylesheet" href="../bootstrap3/font-awesome-4.7.0/css/font-awesome.css" />

    <script src="../bootstrap3/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>


    <link rel="stylesheet" type="text/css" href="../css/ereturn.css"/>
</head>
<body>
<!--网页最上方的留白-->
<header>
    <!-- class.container 容器定位 的作用是进行居中布局 -->
    <div class="container">
        <!-- pull-right 向右对齐  -->
        <span class="pull-right"><small>Sports  Equipment</small> <b>Management</b>System</span>

    </div>
</header>

<!--网页 导航栏 在layout.css 文件中设置背景图片-->
<nav>
    <!-- class.container 容器定位 用于设置内容居中 -->
    <div class="container">
        <h1>
            <b>体育器材管理系统</b> <small>——Design by Z</small>
        </h1>

        <!--导航栏-->
        <div>
            <!-- class="nav navbar-nav" 定义导航条 -->
            <ul class="nav navbar-nav">
                <li><a href="login.html">登录</a></li>
            </ul>
            <!-- class="nav navbar-nav" 定义导航条 向右侧浮动 -->
            <ul class="nav navbar-nav navbar-right">
                <!-- 导航条中的文字使用 class="navbar-text" 样式 -->
                <li><span class="navbar-text">欢迎使用本系统</span></li>

            </ul>
        </div>
        <!-- /导航栏 -->
    </div>
</nav>

    <section>
        <br>

        <div class="container">
            <div class="row">
                <div class="col-md-8"></div>
                <div class="col-md-4">
                    <form id="form-equ"  method="post" enctype="multipart/form-data" class="form-horizontal" role="form">
                        <div>
                            <input type="file" name="file">
                        </div>
                        <div>
                            <input id="btn-submit" type="button" value="上传" />
                        </div>
                    </form>

                </div>

            </div>
        </div>
        <br>
    </section>





<!--页脚开始-->
<!--网页底部， class.well 用于设置背景效果-->
<footer class="well">
    <!-- class.container 的作用是进行居中布局 -->
    <div class="container">
        <b>Copyright © 2020 ？？.com All Rights Reserved
            <a href="#">啥也不是</a>
            版权所有
        </b> <span class="pull-right"> <b>Version</b> 1.1.0
      </span>
    </div>
</footer>
<!--页脚结束-->
<script src="../bootstrap3/jquery-1.9.1.min.js"></script>
<script type="text/javascript">

    $("#btn-submit").click(function() {
        $.ajax({
            "url":"/users/uploademp",
            "data":new FormData($("#form-equ")[0]),
            "contentType":false,
            "processData":false,
            "type":"post",
            "dataType":"json",
            "success":function(json) {
                if (json.state == 4000) {
                    // 提示
                    alert("上传成功！");
                    window.location.href="/web/register.html"
                }
            },
            "error":function(xhr) {
                alert("\n\nHTTP响应码：" + xhr.status+"请联系管理员");
                // location.href = "login.html";
            }
        });
    });
</script>
</body>
</html>